c program to count the number of words in a given string